package com.wm.tast;

public class tast2 {
    public static void main(String[] args) {
        int ms = 20000;
        int pen = 15;
        int key = 35;
        int mouse = 23;
        long c = 0;
        long sT = System.currentTimeMillis();
        for (int p = 1; p < 20000; p++) {
            for (int k = 1; k < 20000; k++) {
                for (int m = 1; m < 20000; m++) {
                    if((p * pen + k * key + m * mouse) == ms){
                        c++;
                    }
                }
            }
        }
        long eT = System.currentTimeMillis();
        System.out.println(c);
        System.out.println(eT-sT);
    }
}
